package com.kuangstudy.config.userlocal;

import com.kuangstudy.entity.User;

public class UserThreadLocal {
    private static ThreadLocal<User> userThreadLocal = new ThreadLocal<User>();

    public static void put(User user) {
        userThreadLocal.set(user);
    }

    public static User get() {
        return userThreadLocal.get();
    }

    public static void clear() {
        userThreadLocal.remove();
    }
}
